Hello again Tom, I have few more questions about using RS 232.
First, could you clarify this statement from the file KMotion425\C Programs\RS232BufferedRS232.c :
"
extern char * volatile pRS232RecIn;
extern char * volatile pRS232TxOut;
while (pRS232RecIn == pRS232RecOut); // wait for data in buffer"
As I read it, this while loop is looking to see whether the two pointers refer to the same address...is that correct? So, is it the case that once data arrives, there will be an offset to where one or the other pointer points? Thus are you using the same 256 byte buffer to store both the incoming and outgoing streams, and just dividing it up?
I also don't quite understand the following:
"DoRS232Cmds = FALSE;
// turn off processing RS232 input as commands"
So, what exactly does the function DoRS232Cmds do? Is it intended to be used exclusively with a "remote control" to interpret and then execute
commands one line ast a time, kind of like a console?
Finally, when using RS232 GetChar, how do you know when you've reached the end of the buffer and/or the end of the last char stored in a non-full buffer? Or are we to use a carriage return or other similar character to signify the end of a multi-character message?
Thanks!